import {Entity, Column} from 'typeorm';
import {BaseEntity} from "@/entitys/common/baseEntity";
import {SupplierType} from "@/typing/supplierType";

export enum BillStateEnum {
    "NotReviewed" = 0, // 未审核
    "Reviewed" = 1, // 审核通过
    "Reject" = 2, // 审核不通过
}

@Entity({comment: "计调审核"})
export class OpReview extends BaseEntity {

    @Column({comment: '团id'})
    tourGroupId: number;

    @Column({comment: '单位id'})
    resourceId: number;

    @Column({comment: '账单ID'})
    billId: number;

    @Column({comment: '账单类型', type: "enum", enum: SupplierType})
    billType: SupplierType;

    @Column({comment: '审核状态', type: "enum", enum: BillStateEnum, default: BillStateEnum.NotReviewed})
    state: BillStateEnum;

}
